<div id="edit_project_stage_<%= @stage.id %>" class='new_or_edit new_or_edit_stage'>
  <div class='stage_form'>
    <%  remote_form_for @stage,
          :update => "edit_stage_#{@stage.id}",
          :url => stage_url(@stage),
          :method => :put,
          :loading => short_loader("edit_project_stage_#{@stage.id}",:height => 257,:width => 712),
          :html => {
            :id => "edit_project_stage_#{@stage.id}_form"
          } do |f| %>
      <dl>
        <dt>待发-阶段名称：</dt>
        <dd>
          <%= f.text_field :name, :size => 80 %>
          <%= f.hidden_field :project_id %>
        </dd>
      </dl>
      <dl>
        <dt>结算起日期：</dt>
        <dd>
          <%= calendar_field( :stage,
                :started_on , {
                  :class => 'date'
                },{
                  :firstDay => 1,
                  :step => 1,
                  :showOthers => true
                }) %>
        </dd>
      </dl>
      <dl>
        <dt>结算止日期：</dt>
        <dd>
          <%= calendar_field( :stage,
                :ended_on , {
                  :class => 'date'
                },{
                  :firstDay => 1,
                  :step => 1,
                  :showOthers => true
                }) %>
        </dd>
      </dl>
      <dl class="lone">
        <dt>状态：</dt>
        <dd>
          <%= f.radio_button :pay_status, 'paying' %><%= f.label :pay_status,'待发', :value => 'paying' %>
          <%= f.radio_button :pay_status, 'paused' %><%= f.label :pay_status,'暂缓', :value => 'paused' %>
          <%= f.radio_button :pay_status, 'payed' %><%= f.label :pay_status,'已发', :value => 'payed' %>
        </dd>
      </dl>
      <dl class="lone">
        <dt>发放日期：</dt>
        <dd>
          <%= calendar_field( :stage,
                :payed_on , {
                  :class => 'date'
                },{
                  :firstDay => 1,
                  :step => 1,
                  :showOthers => true
                }) %>
        </dd>
      </dl>
      <dl>
        <dt class='l'>备注：</dt>
        <dd><%= f.text_area :remark %></dd>
      </dl>
    <% end %>
  </div>
  <div class='buttons'>
    <%= link_to_function '保存',"$('edit_project_stage_#{@stage.id}_form').onsubmit()", :class => 'save button' %>
    <%= link_to_function '返回',"Effect.BlindUp('edit_project_stage_#{@stage.id}')", :class => 'go_back button' %>
  </div>
</div>